package day7;

class Animal {
    public void speak() {
        System.out.println("I am an animal.");
    }
}

class Dog extends Animal {
    @Override
    public void speak() {
        System.out.println("I am a dog.");
    }
    public void wagTail() {
        System.out.println("I am wagging my tail.");
    }
}

//public class Test17 {
//    public static void main(String[] args) {
//        Animal a = new Dog();
//        a.speak();
//        a.wagTail();
//    }
//}